home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 45
/
Amiga Format CD45 (1999-09)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-11].iso
/
+system+
/
tools
/
expert
/
libguide
/
mycheck.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-01-25
|
2KB
|
61 lines
/*************************************************
* myCheck.rexx to split $Check1 and $Check2 *
* V1.1 © Heiko Schröder 98/99 *
*************************************************
* *
* 1.0 - erstes Release, um auch Versions mit- *
* einander vergleichen zu können *
* 1.1 - removed stupid bug *
* better comparison of version strings *
*************************************************/
/* check1=system
check2=LibGuide */
Parse ARG check1","check2
check2=Delstr(check2,1,1)
address command '"SetEnv" Check2='check2
pos1 =lastpos(" ",check1)
check1=Delstr(check1,1,pos1)
address command '"SetEnv" Version='check1
punkt1=lastpos(".",check1)
pos2 =lastpos(" ",check2)
check2=Delstr(check2,1,pos2)
punkt2=lastpos(".",check2)
If punkt1~=0 then Ganzzahl1=Delstr(check1,punkt1)
If punkt2~=0 then Ganzzahl2=Delstr(check2,punkt2)
If Ganzzahl1<Ganzzahl2 then do
address command '"SetEnv" Checkdev1='0
address command '"SetEnv" Checkdev2='1
Exit
End
If Ganzzahl1>Ganzzahl2 then do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='0
Exit
End
If punkt1~=0 then Dezzahl1=Delstr(check1,1,punkt1)
If punkt2~=0 then Dezzahl2=Delstr(check2,1,punkt2)
If Dezzahl1<Dezzahl2 then do
address command '"SetEnv" Checkdev1='0
address command '"SetEnv" Checkdev2='1
Exit
End
If Dezzahl1>Dezzahl2 then do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='0
Exit
End
If Dezzahl1=Dezzahl2 then do
address command '"SetEnv" Checkdev1='1
address command '"SetEnv" Checkdev2='1
Exit
End
Exit